package com.sdkj.recruit.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.Persistent;
import org.springframework.stereotype.Service;

import com.sdkj.recruit.dao.ICollectionResumeDao;
import com.sdkj.recruit.dao.IMongodbDAO;
import com.sdkj.recruit.model.CollectionResume;
import com.sdkj.recruit.mongoSupport.QueryParamCreator;

@Persistent
@Service("collectionDao")
public class CollectionResumeDao implements ICollectionResumeDao{


	@Autowired
	private IMongodbDAO dao;

	@Override
	public void saveCollectionResume(CollectionResume cre) {
		dao.saveOrUpdatePO(cre);
	}

	@Override
	public CollectionResume queryCollectionRecord(String companyId, String resumeId) {
		return dao.getPO(CollectionResume.class, QueryParamCreator.eq("companyId", companyId),QueryParamCreator.eq("resumeId", resumeId));
	}
	
}
